window.onload = function(){
//倒计时定时器
function getRTime(){
	var EndTime= new Date('2019/04/12 00:00:00'); //截止时间 
	var NowTime = new Date(); 
	var t =EndTime.getTime() - NowTime.getTime(); 
	/*var d=Math.floor(t/1000/60/60/24); 
	t-=d*(1000*60*60*24); 
	var h=Math.floor(t/1000/60/60); 
	t-=h*60*60*1000; 
	var m=Math.floor(t/1000/60); 
	t-=m*60*1000; 
	var s=Math.floor(t/1000);*/
	 
	var d=Math.floor(t/1000/60/60/24); 
	var h=Math.floor(t/1000/60/60%24); 
	var m=Math.floor(t/1000/60%60); 
	var s=Math.floor(t/1000%60); 
	 
	document.getElementById("t_d").innerHTML = d + "天"; 
	document.getElementById("t_h").innerHTML = h + "小时"; 
	document.getElementById("t_m").innerHTML = m + "分"; 
	document.getElementById("t_s").innerHTML = s + "秒"; 
} 
getRTime();
setInterval(getRTime,1000);
//点击报名按钮转换个人信息
	var oApplySubmit = document.getElementById("applySubmit");
	var oApplyInfo = document.getElementById("apply-info");
	var oApplyUser = document.getElementById("apply-user");
	oApplySubmit.onclick = function(){
		oApplyInfo.style.display = "none";
		oApplyUser.style.display = "block";
	}
//弹窗
	var oApplyVote = document.getElementById("applyVote");
	var oModalBox = document.getElementById("alertHide");
	var oalertBg = document.getElementById("alertBg");
	var closeVote = document.getElementById("closeVote");
	var alertBody = document.getElementById("alertBody");
	var onloadAlert = document.getElementById("onloadAlert");
	//页面加载时判断关注
//	onloadAlert.style.display = "block";
//	oalertBg.style.display = "block";
	//点击重复投票按钮
	oApplyVote.onclick = function(){
		if(this.className == "unvote"){
			this.className = "applyVote";
		}else{
			oalertBg.style.display = "block";
			alertBody.style.display = "block";
		}
	}
	//点击黑色区域关闭所有弹窗
	oalertBg.onclick = function(){
		oalertBg.style.display = "none";
		alertBody.style.display = "none";
		onloadAlert.style.display = "none";
	}
	//点击弹窗上按钮关闭所有弹窗
	closeVote.onclick = function(){
		oalertBg.style.display = "none";
		alertBody.style.display = "none";
	}




}